#include "pcb.h"

int main()
{
  int a=mkfifo("tong.txt",0644);
  if(a<0)
    perror("mkfifo:");

 int fd = open("tong.txt",O_WRONLY);

 char arr[1024];

  while(1){
    int se=read(0,arr,1024);
    arr[se]='\0';
    write(fd,arr,se+1);
    sleep(1);
  }

    
  return 0;
}
